package com.itheima;

import java.util.Scanner;

public class demo2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个字符串：");
        String line = sc.nextLine();

        int bigNum = 0;
        int smallNum = 0;
        int num = 0;

        for (int i = 0; i < line.length(); i++) {
            char c = line.charAt(i);
            if (c >= 'A' && c <= 'Z') {
                bigNum++;
            } else if (c >= 'a' && c <= 'z') {
                smallNum++;
            } else if (c >= '0' && c <= '9') {
                num++;
            }
        }
        System.out.println("大写字母有：" + bigNum + "个");
        System.out.println("小写字母有：" + smallNum + "个");
        System.out.println("数字有：" + num + "个");
    }
}
